<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        #df {
            width: 550px;
            height: 1000px;
            margin: auto;
        }

        #d1 {
            width: 150px;
            height: 1000px;
            background-color: burlywood;
            float: left;
        }

        #d2 {
            width: 400px;
            height: 1000px;
            float: left;
            background-color: darksalmon;
        }

        #img1 {
            width: 150px;
            height: 150px;
        }
    </style>
</head>
<body>
<div id="df">

<!--    <div id="d1">-->
<!--        <img src="img/a1.webp" id="img1">-->
<!--        <input type="file" name="file1" id="file1" value="" onchange="huan()" /><br />-->
<!--    </div>-->

        <form action="index2.php" method="post" enctype="multipart/form-data">
            <div id="d1">
                <img src="test_img/images/a1.webp" id="img1">
                <input type="file" name="file1" id="file1"  value="" onchange="huan()"  /><br />
            </div>
            <div id="d2">
            <table border="0" cellspacing="" cellpadding="">
                <tr align="center">
                    <th>个人资料</th>
                </tr>
                <tr>
                    <td>
                        姓名<br />
                        <input type="text" name="user_name" id="user_name" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        特长<br />
                        <input type="text" name="speciality" id="speciality" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        性别<br />
                        <input type="radio" name="sex" id="male" value="man" checked="checked"/>男
                        <input type="radio" name="sex" id="female" value="woman" />女
                    </td>
                </tr>
                <tr>
                    <td>
                        公司<br />
                        <input type="text" name="company" id="company" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        职务<br />
                        <input type="text" name="duty" id="duty" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        微信<br />
                        <input type="text" name="vx" id="vx" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        QQ<br />
                        <input type="text" name="qq" id="qq" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        领英<br />
                        <input type="text" name="ly" id="ly" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        微博<br />
                        <input type="text" name="wb" id="wb" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        博客<br />
                        <input type="text" name="bk" id="bk" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        所在地<br />
                        <input type="text" name="address" id="address" value="" />
                    </td>
                </tr>
                <tr>
                    <td>
                        自我介绍<br />
                        <textarea rows="5" cols="21" name="self_info" id='self_info'>

						</textarea>
                    </td>
                </tr>

            </table>
            <input type="submit" value="提交"/>
        </form>
    </div>
</div>
</body>
<script type="text/javascript">
    var fileobj = document.getElementById('file1');

    function huan() {
        var files = fileobj['files'];
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('img1').src = imgURL;
    }
</script>
</html>
